Batching asynchronous web requests

ABSTRACT

An example embodiment may involve receiving, by a web server device, a message containing a plurality of asynchronous requests for web content, where the plurality is received from a client device that was provided with a web document from which the web content is at least in part derivable. The example embodiment may also involve sorting, by the web server device, the plurality into an ordering based on respective estimated execution times of the plurality, where the ordering is from least to greatest estimated execution time. The example embodiment may also involve processing, by the web server device, the plurality as ordered until either a predetermined amount of time measured from the beginning of the processing has expired, or all requests of the plurality have been processed. The example embodiment may also involve transmitting, by the web server device and to the client device, results associated with the processed requests.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/497,818, filed Apr. 26, 2017, which is hereby incorporated byreference in its entirety.

BACKGROUND

Web transactions may involve a web server device transmitting a webdocument to a client device. The web document may be formatted inaccordance with a markup language, such as the HyperText Markup Language(HTML). The web document may define static content and how this staticcontent should be presented on a web page rendered by the client device.In some cases, parts of the web document are not known until the webdocument is about to be transmitted to the client device or until afterthis transmission takes place. Therefore, markup languages may alsosupport dynamic content through embedded client-side scripts. Thesescripts may be delivered to the client device as part of the webdocument, and may be executed by a web browser on the client device.Such execution may cause the client device to carry out function calls,some of which may result in the client device transmitting requests forand receiving the dynamic content from the web server device or otherdevices. In this fashion, dynamic content can be combined with thestatic content of the web document, facilitating more flexibility in thetypes of information that can be provided to client devices.

A script may identify a function call as being synchronous orasynchronous. Accordingly, a request for dynamic content may be madesynchronously or asynchronously. Synchronous requests are typicallytransmitted and executed in order, meaning that a synchronous requestmay require that the client device waits until the request is completedbefore the next request is sent. Asynchronous requests, on the otherhand, may be transmitted at any time during or after the rendering ofthe web document for display as a web page. From a client-sideperformance and user experience standpoint, asynchronous requests maygenerally be preferred over synchronous requests because asynchronousrequests may allow the web browser to load a web page more quickly andto perform other actions while a request is in the process of beingcompleted. For instance, if one part of a web page is loading as aresult of an asynchronous request for web content, a user may interactwith and perform other operations related to the web page while theasynchronous request is being completed. On the other hand, the webserver device may be subjected to communication and processing overheadfor each asynchronous request that it receives.

SUMMARY

The embodiments herein involve the batching of asynchronous requests forweb content. In line with the discussion above, a client device may readasynchronous function calls of a web document received from a web serverdevice, and add representations of the asynchronous function calls to aclient-side queue. The client device may then generate a “batch” ofasynchronous requests corresponding to the queued function calls (e.g.,two or more asynchronous requests combined in some fashion into a singlemessage), and send this batch of requests to the web server device.

Upon receipt of the requests, the web server device may estimate howmuch time it will take for the web server device to execute each requestand may sort the requests in order of the estimated execution times. Theweb server device may then begin processing the requests in the sortedorder, starting with the request estimated to take the least amount oftime. The web server device may be configured to process these requestsuntil either a predetermined period of time has elapsed, or all therequests have been processed. After one of these conditions is met, theweb server device may complete the requests by returning, to the clientdevice, results (e.g., web content) associated with each completedrequest.

The client device and the web server device may repeat this batchingprocedure until results have been returned for all of the asynchronousfunction calls of the web document or until the client-side queue isempty. By enabling the client device and the web server device to handleasynchronous requests in this manner, the communication and processingoverhead on the web server device may be reduced. Notably, the number oftransactions per web document that the client device carries out withthe web server device may be reduced. This, in turn, can improve theperformance of the web server device, since the web server device may beable to serve more web documents per unit of time.

Accordingly, a first example embodiment may involve receiving, by a webserver device, a message containing a plurality of asynchronous requestsfor web content. The plurality of asynchronous requests may be receivedfrom a client device that was provided with a web document from whichthe web content is at least in part derivable. The first exampleembodiment may also involve sorting, by the web server device, theplurality of asynchronous requests into an ordering based on respectiveestimated execution times of the plurality of asynchronous requests. Theordering may be from least estimated execution time to greatestestimated execution time. The first example embodiment may also involveprocessing, by the web server device, the plurality of asynchronousrequests as ordered. The web server device may process the plurality ofasynchronous requests as ordered until either a predetermined amount oftime measured from the beginning of the processing has expired, or allof the plurality of asynchronous requests have been processed. The firstexample embodiment may also involve transmitting, by the web serverdevice and to the client device, results associated with the pluralityof asynchronous requests that were processed.

Further, a second example embodiment may involve receiving, by a clientdevice, a web document. The web document may include script contentdefining a first plurality of asynchronous function calls for webcontent accessible by way of a web server device and a second pluralityof asynchronous function calls for web content accessible by way of theweb server device. The client device may receive the web document fromthe web server device. The second example embodiment may also involvetransmitting, by the client device and to the web server device, a firstmessage containing an ordered representation of the first plurality ofasynchronous function calls. The second example embodiment may alsoinvolve receiving, by the client device and from the web server device,results associated with a first subset of the first plurality ofasynchronous function calls that were processed by the web serverdevice. A second subset of the first plurality of asynchronous functioncalls may not have been processed by the web server device, and thesecond subset of the first plurality of asynchronous function calls mayinclude one or more asynchronous function calls that appear before oneor more of the first plurality of asynchronous function calls in theordered representation. The second example embodiment may also involvetransmitting, by the client device and to the web server device, asecond message containing a representation of the second subset of thefirst plurality of asynchronous function calls and the second pluralityof asynchronous function calls.

In a third example embodiment, an article of manufacture may include anon-transitory computer-readable medium, having stored thereon programinstructions that, upon execution by a computing system, cause thecomputing system to perform operations in accordance with the firstand/or second example embodiment.

In a fourth example embodiment, a computing system may include at leastone processor, as well as memory and program instructions. The programinstructions may be stored in the memory, and upon execution by the atleast one processor, cause the computing system to perform operations inaccordance with the first and/or second example embodiment.

In a fifth example embodiment, a system may include various means forcarrying out each of the operations of the first and/or second exampleembodiment.

These as well as other embodiments, aspects, advantages, andalternatives will become apparent to those of ordinary skill in the artby reading the following detailed description, with reference whereappropriate to the accompanying drawings. Further, this summary andother descriptions and figures provided herein are intended toillustrate embodiments by way of example only and, as such, thatnumerous variations are possible. For instance, structural elements andprocess steps can be rearranged, combined, distributed, eliminated, orotherwise changed, while remaining within the scope of the embodimentsas claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a schematic drawing of a computing device, inaccordance with example embodiments.

FIG. 2 illustrates a schematic drawing of a server device cluster, inaccordance with example embodiments.

FIG. 3 depicts a remote network management architecture, in accordancewith example embodiments.

FIG. 4 depicts a communication environment involving a remote networkmanagement architecture, in accordance with example embodiments.

FIG. 5A depicts another communication environment involving a remotenetwork management architecture, in accordance with example embodiments.

FIG. 5B is a flow chart, in accordance with example embodiments.

FIG. 6 is a message flow diagram, in accordance with exampleembodiments.

FIG. 7A is a flow chart, in accordance with example embodiments.

FIG. 7B is a flow chart, in accordance with example embodiments.

DETAILED DESCRIPTION

Example methods, devices, and systems are described herein. It should beunderstood that the words “example” and “exemplary” are used herein tomean “serving as an example, instance, or illustration.” Any embodimentor feature described herein as being an “example” or “exemplary” is notnecessarily to be construed as preferred or advantageous over otherembodiments or features unless stated as such. Thus, other embodimentscan be utilized and other changes can be made without departing from thescope of the subject matter presented herein.

Accordingly, the example embodiments described herein are not meant tobe limiting. It will be readily understood that the aspects of thepresent disclosure, as generally described herein, and illustrated inthe figures, can be arranged, substituted, combined, separated, anddesigned in a wide variety of different configurations. For example, theseparation of features into “client” and “server” components may occurin a number of ways.

Further, unless context suggests otherwise, the features illustrated ineach of the figures may be used in combination with one another. Thus,the figures should be generally viewed as component aspects of one ormore overall embodiments, with the understanding that not allillustrated features are necessary for each embodiment.

Additionally, any enumeration of elements, blocks, or steps in thisspecification or the claims is for purposes of clarity. Thus, suchenumeration should not be interpreted to require or imply that theseelements, blocks, or steps adhere to a particular arrangement or arecarried out in a particular order.

I. Introduction

A large enterprise is a complex entity with many interrelatedoperations. Some of these are found across the enterprise, such as humanresources (HR), supply chain, information technology (IT), and finance.However, each enterprise also has its own unique operations that provideessential capabilities and/or create competitive advantages.

To support widely-implemented operations, enterprises typically useoff-the-shelf software applications, such as customer relationshipmanagement (CRM) and human capital management (HCM) packages. However,they may also need custom software applications to meet their own uniquerequirements. A large enterprise often has dozens or hundreds of thesecustom software applications. Nonetheless, the advantages provided bythe embodiments herein are not limited to large enterprises and may beapplicable to an enterprise, or any other type of organization, of anysize.

Many such software applications are developed by individual departmentswithin the enterprise. These range from simple spreadsheets tocustom-built software tools and databases. But the proliferation ofsiloed custom software applications has numerous disadvantages. Itnegatively impacts an enterprise's ability to run and grow its business,innovate, and meet regulatory requirements. The enterprise may find itdifficult to integrate, streamline and enhance its operations due tolack of a single system that unifies its subsystems and data.

To efficiently create custom applications, enterprises would benefitfrom a remotely-hosted application platform that eliminates unnecessarydevelopment complexity. The goal of such a platform would be to reducetime-consuming, repetitive application development tasks so thatsoftware engineers and individuals in other roles can focus ondeveloping unique, high-value features.

In order to achieve this goal, the concept of Application Platform as aService (aPaaS) is introduced, to intelligently automate workflowsthroughout the enterprise. An aPaaS system is hosted remotely from theenterprise, but may access data and services within the enterprise byway of secure connections. Such an aPaaS system may have a number ofadvantageous capabilities and characteristics. These advantages andcharacteristics may be able to improve the enterprise's operations andworkflow for IT, HR, CRM, customer service, application development, andsecurity.

The aPaaS system may support development and execution ofmodel-view-controller (MVC) applications. MVC applications divide theirfunctionality into three interconnected parts (model, view, andcontroller) in order to isolate representations of information from themanner in which the information is presented to the user, therebyallowing for efficient code reuse and parallel development. Theseapplications may be web-based, and offer create, read, update, delete(CRUD) capabilities. This allows new applications to be built on acommon application infrastructure.

The aPaaS system may support standardized application components, suchas a standardized set of widgets for graphical user interface (GUI)development. In this way, applications built using the aPaaS system havea common look and feel. Other software components and modules may bestandardized as well. In some cases, this look and feel can be brandedor skinned with an enterprise's custom logos and/or color schemes.

The aPaaS system may support the ability to configure the behavior ofapplications using metadata. This allows application behaviors to berapidly adapted to meet specific needs. Such an approach reducesdevelopment time and increases flexibility. Further, the aPaaS systemmay support GUI tools that facilitate metadata creation and management,thus reducing errors in the metadata.

The aPaaS system may support clearly-defined interfaces betweenapplications, so that software developers can avoid unwantedinter-application dependencies. Thus, the aPaaS system may implement aservice layer in which persistent state information and other data isstored.

The aPaaS system may support a rich set of integration features so thatthe applications thereon can interact with got legacy applications andthird-party applications. For instance, the aPaaS system may support acustom employee-onboarding system that integrates with legacy HR, IT,and accounting systems.

The aPaaS system may support enterprise-grade security. Furthermore,since the aPaaS system may be remotely hosted, it should also utilizesecurity procedures when it interacts with systems in the enterprise orthird-party networks and services hosted outside of the enterprise. Forexample, the aPaaS system may be configured to share data amongst theenterprise and other parties to detect and identify common securitythreats.

Other features, functionality, and advantages of an aPaaS system mayexist. This description is for purpose of example and is not intended tobe limiting.

As an example of the aPaaS development process, a software developer maybe tasked to create a new application using the aPaaS system. First, thedeveloper may define the data model, which specifies the types of datathat the application uses and the relationships therebetween. Then, viaa GUI of the aPaaS system, the developer enters (e.g., uploads) the datamodel. The aPaaS system automatically creates all of the correspondingdatabase tables, fields, and relationships, which can then be accessedvia an object-oriented services layer.

In addition, the aPaaS system can also build a fully-functional MVCapplication with client-side interfaces and server-side CRUD logic. Thisgenerated application may serve as the basis of further development forthe user. Advantageously, the developer does not have to spend a largeamount of time on basic application functionality. Further, since theapplication may be web-based, it can be accessed from anyInternet-enabled client device. Alternatively or additionally, a localcopy of the application may be able to be accessed, for instance, whenInternet service is not available.

The aPaaS system may also support a rich set of pre-definedfunctionality that can be added to applications. These features includesupport for searching, email, templating, workflow design, reporting,analytics, social media, scripting, mobile-friendly output, andcustomized GUIs.

The following embodiments describe architectural and functional aspectsof example aPaaS systems, as well as the features and advantagesthereof.

II. Example Computing Devices and Cloud-Based Computing Environments

FIG. 1 is a simplified block diagram exemplifying a computing device100, illustrating some of the components that could be included in acomputing device arranged to operate in accordance with the embodimentsherein. Computing device 100 could be a client device (e.g., a deviceactively operated by a user), a server device (e.g., a device thatprovides computational services to client devices), or some other typeof computational platform. Some server devices may operate as clientdevices from time to time in order to perform particular operations.

In this example, computing device 100 includes processor(s) 102(referred to as “processor 102” for sake of simplicity), memory 104,network interface(s) 106, and an input/output unit 108, all of which maybe coupled by a system bus 110 or a similar mechanism. In someembodiments, computing device 100 may include other components and/orperipheral devices (e.g., detachable storage, printers, and so on).

Processor 102 may be any type of computer processing unit, such as acentral processing unit (CPU), a co-processor (e.g., a mathematics,graphics, or encryption co-processor), a digital signal processor (DSP),a network processor, and/or a form of integrated circuit or controllerthat performs processor operations. In some cases, processor 102 may bea single-core processor, and in other cases, processor 102 may be amulti-core processor with multiple independent processing units.Processor 102 may also include register memory for temporarily storinginstructions being executed and related data, as well as cache memoryfor temporarily storing recently-used instructions and data.

Memory 104 may be any form of computer-usable memory, including but notlimited to register memory and cache memory (which may be incorporatedinto processor 102), as well as random access memory (RAM), read-onlymemory (ROM), and non-volatile memory (e.g., flash memory, hard diskdrives, solid state drives, compact discs (CDs), digital video discs(DVDs), and/or tape storage). Other types of memory may includebiological memory.

Memory 104 may store program instructions and/or data on which programinstructions may operate. By way of example, memory 104 may store theseprogram instructions on a non-transitory, computer-readable medium, suchthat the instructions are executable by processor 102 to carry out anyof the methods, processes, or operations disclosed in this specificationor the accompanying drawings.

As shown in FIG. 1, memory 104 may include firmware 104A, kernel 104B,and/or applications 104C. Firmware 104A may be program code used to bootor otherwise initiate some or all of computing device 100. Kernel 104Bmay be an operating system, including modules for memory management,scheduling and management of processes, input/output, and communication.Kernel 104B may also include device drivers that allow the operatingsystem to communicate with the hardware modules (e.g., memory units,networking interfaces, ports, and busses), of computing device 100.Applications 104C may be one or more user-space software programs, suchas web browsers or email clients, as well as any software libraries usedby these programs.

Network interface(s) 106 may take the form of a wireline interface, suchas Ethernet (e.g., Fast Ethernet, Gigabit Ethernet, and so on). Networkinterface(s) 106 may also support communication over non-Ethernet media,such as coaxial cables or power lines, or over wide-area media, such asSynchronous Optical Networking (SONET) or digital subscriber line (DSL)technologies. Network interface(s) 106 may also take the form of awireless interface, such as IEEE 802.11 (Wifi), BLUETOOTH®, globalpositioning system (GPS), or a wide-area wireless interface. However,other forms of physical layer interfaces and other types of standard orproprietary communication protocols may be used over networkinterface(s) 106. Furthermore, network interface(s) 106 may comprisemultiple physical interfaces. For instance, some embodiments ofcomputing device 100 may include Ethernet, BLUETOOTH®, and Wifiinterfaces.

Input/output unit 108 may facilitate user and peripheral deviceinteraction with example computing device 100. Input/output unit 108 mayinclude one or more types of input devices, such as a keyboard, a mouse,a touch screen, and so on. Similarly, input/output unit 108 may includeone or more types of output devices, such as a screen, monitor, printer,and/or one or more light emitting diodes (LEDs). Additionally oralternatively, computing device 100 may communicate with other devicesusing a universal serial bus (USB) or high-definition multimediainterface (HDMI) port interface, for example.

In some embodiments, one or more instances of computing device 100 maybe deployed to support an aPaaS architecture. The exact physicallocation, connectivity, and configuration of these computing devices maybe unknown and/or unimportant to client devices. Accordingly, thecomputing devices may be referred to as “cloud-based” devices that maybe housed at various remote data center locations.

FIG. 2 depicts a cloud-based server cluster 200 in accordance withexample embodiments. In FIG. 2, operations of a computing device (e.g.,computing device 100) may be distributed between server devices 202,data storage 204, and routers 206, all of which may be connected bylocal cluster network 208. The number of server devices 202, datastorages 204, and routers 206 in server cluster 200 may depend on thecomputing task(s) and/or applications assigned to server cluster 200.

For example, server devices 202 can be configured to perform variouscomputing tasks of computing device 100. Thus, computing tasks can bedistributed among one or more of server devices 202. To the extent thatthese computing tasks can be performed in parallel, such a distributionof tasks may reduce the total time to complete these tasks and return aresult. For purpose of simplicity, both server cluster 200 andindividual server devices 202 may be referred to as a “server device.”This nomenclature should be understood to imply that one or moredistinct server devices, data storage devices, and cluster routers maybe involved in server device operations.

Data storage 204 may be data storage arrays that include drive arraycontrollers configured to manage read and write access to groups of harddisk drives and/or solid state drives. The drive array controllers,alone or in conjunction with server devices 202, may also be configuredto manage backup or redundant copies of the data stored in data storage204 to protect against drive failures or other types of failures thatprevent one or more of server devices 202 from accessing units ofcluster data storage 204. Other types of memory aside from drives may beused.

Routers 206 may include networking equipment configured to provideinternal and external communications for server cluster 200. Forexample, routers 206 may include one or more packet-switching and/orrouting devices (including switches and/or gateways) configured toprovide (i) network communications between server devices 202 and datastorage 204 via cluster network 208, and/or (ii) network communicationsbetween the server cluster 200 and other devices via communication link210 to network 212.

Additionally, the configuration of cluster routers 206 can be based atleast in part on the data communication requirements of server devices202 and data storage 204, the latency and throughput of the localcluster network 208, the latency, throughput, and cost of communicationlink 210, and/or other factors that may contribute to the cost, speed,fault-tolerance, resiliency, efficiency and/or other design goals of thesystem architecture.

As a possible example, data storage 204 may include any form ofdatabase, such as a structured query language (SQL) database. Varioustypes of data structures may store the information in such a database,including but not limited to tables, arrays, lists, trees, and tuples.Furthermore, any databases in data storage 204 may be monolithic ordistributed across multiple physical devices.

Server devices 202 may be configured to transmit data to and receivedata from cluster data storage 204. This transmission and retrieval maytake the form of SQL queries or other types of database queries, and theoutput of such queries, respectively. Additional text, images, video,and/or audio may be included as well. Furthermore, server devices 202may organize the received data into web page representations. Such arepresentation may take the form of a markup language, such as thehypertext markup language (HTML), the extensible markup language (XML),or some other standardized or proprietary format. Moreover, serverdevices 202 may have the capability of executing various types ofcomputerized scripting languages, such as but not limited to Perl,Python, PHP Hypertext Preprocessor (PHP), Active Server Pages (ASP),JavaScript, and so on. Computer program code written in these languagesmay facilitate the providing of web pages to client devices, as well asclient device interaction with the web pages.

III. Example Remote Network Management Architecture

FIG. 3 depicts a remote network management architecture, in accordancewith example embodiments. This architecture includes three maincomponents, managed network 300, remote network management platform 320,and third-party networks 340, all connected by way of Internet 350.

Managed network 300 may be, for example, an enterprise network used by abusiness for computing and communications tasks, as well as storage ofdata. Thus, managed network 300 may include various client devices 302,server devices 304, routers 306, virtual machines 308, firewall 310,and/or proxy servers 312. Client devices 302 may be embodied bycomputing device 100, server devices 304 may be embodied by computingdevice 100 or server cluster 200, and routers 306 may be any type ofrouter, switch, or gateway.

Virtual machines 308 may be embodied by one or more of computing device100 or server cluster 200. In general, a virtual machine is an emulationof a computing system, and mimics the functionality (e.g., processor,memory, and communication resources) of a physical computer. Onephysical computing system, such as server cluster 200, may support up tothousands of individual virtual machines. In some embodiments, virtualmachines 308 may be managed by a centralized server device orapplication that facilitates allocation of physical computing resourcesto individual virtual machines, as well as performance and errorreporting. Enterprises often employ virtual machines in order toallocate computing resources in an efficient, as needed fashion.Providers of virtualized computing systems include VMWARE® andMICROSOFT®.

Firewall 310 may be one or more specialized routers or server devicesthat protect managed network 300 from unauthorized attempts to accessthe devices and services therein, while allowing authorizedcommunication that is initiated from managed network 300. Firewall 310may also provide intrusion detection, web filtering, virus scanning,application-layer gateways, and other services. In some embodiments notshown in FIG. 3, managed network 300 may include one or more virtualprivate network (VPN) gateways with which it communicates with remotenetwork management platform 320 (see below).

Managed network 300 may also include one or more proxy servers 312. Anembodiment of proxy servers 312 may be a server device that facilitatescommunication and movement of data between managed network 300, remotenetwork management platform 320, and third-party networks 340. Inparticular, proxy servers 312 may be able to establish and maintainsecure communication sessions with one or more customer instances ofremote network management platform 320. By way of such a session, remotenetwork management platform 320 may be able to discover and manageaspects of the architecture and configuration of managed network 300 andits components. Possibly with the assistance of proxy servers 312,remote network management platform 320 may also be able to discover andmanage aspects of third-party networks 340 that are used by managednetwork 300.

Firewalls, such as firewall 310, typically deny all communicationsessions that are incoming by way of Internet 350, unless such a sessionwas ultimately initiated from behind the firewall (i.e., from a deviceon managed network 300) or the firewall has been explicitly configuredto support the session. By placing proxy servers 312 behind firewall 310(e.g., within managed network 300 and protected by firewall 310), proxyservers 312 may be able to initiate these communication sessions throughfirewall 310. Thus, firewall 310 might not have to be specificallyconfigured to support incoming sessions from remote network managementplatform 320, thereby avoiding potential security risks to managednetwork 300.

In some cases, managed network 300 may consist of a few devices and asmall number of networks. In other deployments, managed network 300 mayspan multiple physical locations and include hundreds of networks andhundreds of thousands of devices. Thus, the architecture depicted inFIG. 3 is capable of scaling up or down by orders of magnitude.

Furthermore, depending on the size, architecture, and connectivity ofmanaged network 300, a varying number of proxy servers 312 may bedeployed therein. For example, each one of proxy servers 312 may beresponsible for communicating with remote network management platform320 regarding a portion of managed network 300. Alternatively oradditionally, sets of two or more proxy servers may be assigned to sucha portion of managed network 300 for purposes of load balancing,redundancy, and/or high availability.

Remote network management platform 320 is a hosted environment thatprovides aPaaS services to users, particularly to the operators ofmanaged network 300. These services may take the form of web-basedportals, for instance. Thus, a user can securely access remote networkmanagement platform 320 from, for instance, client devices 302, orpotentially from a client device outside of managed network 300. By wayof the web-based portals, users may design, test, and deployapplications, generate reports, view analytics, and perform other tasks.

As shown in FIG. 3, remote network management platform 320 includes fourcustomer instances 322, 324, 326, and 328. Each of these instances mayrepresent a set of web portals, services, and applications (e.g., awholly-functioning aPaaS system) available to a particular customer. Insome cases, a single customer may use multiple customer instances. Forexample, managed network 300 may be an enterprise customer of remotenetwork management platform 320, and may use customer instances 322,324, and 326. The reason for providing multiple instances to onecustomer is that the customer may wish to independently develop, test,and deploy its applications and services. Thus, customer instance 322may be dedicated to application development related to managed network300, customer instance 324 may be dedicated to testing theseapplications, and customer instance 326 may be dedicated to the liveoperation of tested applications and services.

The multi-instance architecture of remote network management platform320 is in contrast to conventional multi-tenant architectures, overwhich multi-instance architectures have several advantages. Inmulti-tenant architectures, data from different customers (e.g.,enterprises) are comingled in a single database. While these customers'data are separate from one another, the separation is enforced by thesoftware that operates the single database. As a consequence, a securitybreach in this system may impact all customers' data, creatingadditional risk, especially for entities subject to governmental,healthcare, and/or financial regulation. Furthermore, any databaseoperations that impact one customer will likely impact all customerssharing that database. Thus, if there is an outage due to hardware orsoftware errors, this outage affects all such customers. Likewise, ifthe database is to be upgraded to meet the needs of one customer, itwill be unavailable to all customers during the upgrade process. Often,such maintenance windows will be long, due to the size of the shareddatabase.

In contrast, the multi-instance architecture provides each customer withits own database in a dedicated computing instance. This preventscomingling of customer data, and allows each instance to beindependently managed. For example, when one customer's instanceexperiences an outage due to errors or an upgrade, other customerinstances are not impacted. Maintenance down time is limited because thedatabase only contains one customer's data. Further, the simpler designof the multi-instance architecture allows redundant copies of eachcustomer database and instance to be deployed in a geographicallydiverse fashion. This facilitates high availability, where the liveversion of the customer's instance can be moved when faults are detectedor maintenance is being performed.

In order to support multiple customer instances in an efficient fashion,remote network management platform 320 may implement a plurality ofthese instances on a single hardware platform. For example, when theaPaaS system is implemented on a server cluster such as server cluster200, it may operate a virtual machine that dedicates varying amounts ofcomputational, storage, and communication resources to instances. Butfull virtualization of server cluster 200 might not be necessary, andother mechanisms may be used to separate instances. In some examples,each instance may have a dedicated account and one or more dedicateddatabases on server cluster 200. Alternatively, customer instance 322may span multiple physical devices.

In some cases, a single server cluster of remote network managementplatform 320 may support multiple independent enterprises. Furthermore,as described below, remote network management platform 320 may includemultiple server clusters deployed in geographically diverse data centersin order to facilitate load balancing, redundancy, and/or highavailability.

Third-party networks 340 may be remote server devices (e.g., a pluralityof server clusters such as server cluster 200) that can be used foroutsourced computational, data storage, communication, and servicehosting operations. These servers may be virtualized (i.e., the serversmay be virtual machines). Examples of third-party networks 340 mayinclude AMAZON WEB SERVICES® and MICROSOFT® Azure. Like remote networkmanagement platform 320, multiple server clusters supporting third-partynetworks 340 may be deployed at geographically diverse locations forpurposes of load balancing, redundancy, and/or high availability.

Managed network 300 may use one or more of third-party networks 340 todeploy services to its clients and customers. For instance, if managednetwork 300 provides online music streaming services, third-partynetworks 340 may store the music files and provide web interface andstreaming capabilities. In this way, the enterprise of managed network300 does not have to build and maintain its own servers for theseoperations.

Remote network management platform 320 may include modules thatintegrate with third-party networks 340 to expose virtual machines andmanaged services therein to managed network 300. The modules may allowusers to request virtual resources and provide flexible reporting forthird-party networks 340. In order to establish this functionality, auser from managed network 300 might first establish an account withthird-party networks 340, and request a set of associated resources.Then, the user may enter the account information into the appropriatemodules of remote network management platform 320. These modules maythen automatically discover the manageable resources in the account, andalso provide reports related to usage, performance, and billing.

Internet 350 may represent a portion of the global Internet. However,Internet 350 may alternatively represent a different type of network,such as a private wide-area or local-area packet-switched network.

FIG. 4 further illustrates the communication environment between managednetwork 300 and customer instance 322, and introduces additionalfeatures and alternative embodiments. In FIG. 4, customer instance 322is replicated across data centers 400A and 400B. These data centers maybe geographically distant from one another, perhaps in different citiesor different countries. Each data center includes support equipment thatfacilitates communication with managed network 300, as well as remoteusers.

In data center 400A, network traffic to and from external devices flowseither through VPN gateway 402A or firewall 404A. VPN gateway 402A maybe peered with VPN gateway 412 of managed network 300 by way of asecurity protocol such as Internet Protocol Security (IPSEC). Firewall404A may be configured to allow access from authorized users, such asuser 414 and remote user 416, and to deny access to unauthorized users.By way of firewall 404A, these users may access customer instance 322,and possibly other customer instances. Load balancer 406A may be used todistribute traffic amongst one or more physical or virtual serverdevices that host customer instance 322. Load balancer 406A may simplifyuser access by hiding the internal configuration of data center 400A,(e.g., customer instance 322) from client devices. For instance, ifcustomer instance 322 includes multiple physical or virtual computingdevices that share access to multiple databases, load balancer 406A maydistribute network traffic and processing tasks across these computingdevices and databases so that no one computing device or database issignificantly busier than the others. In some embodiments, customerinstance 322 may include VPN gateway 402A, firewall 404A, and loadbalancer 406A.

Data center 400B may include its own versions of the components in datacenter 400A. Thus, VPN gateway 402B, firewall 404B, and load balancer406B may perform the same or similar operations as VPN gateway 402A,firewall 404A, and load balancer 406A, respectively. Further, by way ofreal-time or near-real-time database replication and/or otheroperations, customer instance 322 may exist simultaneously in datacenters 400A and 400B.

Data centers 400A and 400B as shown in FIG. 4 may facilitate redundancyand high availability. In the configuration of FIG. 4, data center 400Ais active and data center 400B is passive. Thus, data center 400A isserving all traffic to and from managed network 300, while the versionof customer instance 322 in data center 400B is being updated innear-real-time. Other configurations, such as one in which both datacenters are active, may be supported.

Should data center 400A fail in some fashion or otherwise becomeunavailable to users, data center 400B can take over as the active datacenter. For example, domain name system (DNS) servers that associate adomain name of customer instance 322 with one or more Internet Protocol(IP) addresses of data center 400A may re-associate the domain name withone or more IP addresses of data center 400B. After this re-associationcompletes (which may take less than one second or several seconds),users may access customer instance 322 by way of data center 400B.

FIG. 4 also illustrates a possible configuration of managed network 300.As noted above, proxy servers 312 and user 414 may access customerinstance 322 through firewall 310. Proxy servers 312 may also accessconfiguration items 410. In FIG. 4, configuration items 410 may refer toany or all of client devices 302, server devices 304, routers 306, andvirtual machines 308, any applications, programs, or services executingthereon, as well as relationships between devices and services. Thus,the term “configuration items” may be shorthand for any physical orvirtual device or service remotely discoverable or managed by customerinstance 322, or relationships between discovered devices and services.Configuration items may be represented in a configuration managementdatabase (CMDB) of customer instance 322.

As noted above, VPN gateway 412 may provide a dedicated VPN to VPNgateway 402A. Such a VPN may be helpful when there is a significantamount of traffic between managed network 300 and customer instance 322,or security policies otherwise suggest or require use of a VPN betweenthese sites. In some embodiments, any device in managed network 300and/or customer instance 322 that directly communicates via the VPN isassigned a public IP address. Other devices in managed network 300and/or customer instance 322 may be assigned private IP addresses (e.g.,IP addresses selected from the 10.0.0.0-10.255.255.255 or192.168.0.0-192.168.255.255 ranges, represented in shorthand as subnets10.0.0.0/8 and 192.168.0.0/16, respectively).

IV. Example Device and Service Discovery

In order for remote network management platform 320 to administer thedevices and services of managed network 300, remote network managementplatform 320 may first determine what devices are present in managednetwork 300, the configurations and operational statuses of thesedevices, and the services provided by the devices, and well as therelationships between discovered devices and services. As noted above,each device, service, and relationship may be referred to as aconfiguration item. The process of defining configuration items withinmanaged network 300 is referred to as discovery, and may be facilitatedat least in part by proxy servers 312.

For purpose of the embodiments herein, a “service” may refer to aprocess, thread, application, program, server, or any other softwarethat executes on a device. A “service” may also refer to a high-levelcapability provided by multiple processes, threads, applications,programs, and/or servers on one or more devices working in conjunctionwith one another. For example, a high-level web service may involvemultiple web application server threads executing on one device andaccessing information from a database service that executes on anotherdevice. The distinction between different types or levels of servicesmay depend upon the context in which they are presented.

FIG. 5A provides a logical depiction of how configuration items can bediscovered, as well as how information related to discoveredconfiguration items can be stored. For sake of simplicity, remotenetwork management platform 320, third-party networks 340, and Internet350 are not shown.

In FIG. 5A, CMDB 500 and task list 502 are stored within customerinstance 322. Customer instance 322 may transmit discovery commands toproxy servers 312. In response, proxy servers 312 may transmit probes tovarious devices and services in managed network 300. These devices andservices may transmit responses to proxy servers 312, and proxy servers312 may then provide information regarding discovered configurationitems to CMDB 500 for storage therein. Configuration items stored inCMDB 500 represent the environment of managed network 300.

Task list 502 represents a list of activities that proxy servers 312 areto perform on behalf of customer instance 322. As discovery takes place,task list 502 is populated. Proxy servers 312 repeatedly query task list502, obtain the next task therein, and perform this task until task list502 is empty or another stopping condition has been reached.

To facilitate discovery, proxy servers 312 may be configured withinformation regarding one or more subnets in managed network 300 thatare reachable by way of proxy servers 312. For instance, proxy servers312 may be given the IP address range 192.168.0/24 as a subnet. Then,customer instance 322 may store this information in CMDB 500 and placetasks in task list 502 for discovery of devices at each of theseaddresses.

FIG. 5A also depicts devices and services in managed network 300 asconfiguration items 504, 506, 508, 510, and 512. As noted above, theseconfiguration items represent a set of physical and/or virtual devices(e.g., client devices, server devices, routers, or virtual machines),services executing thereon (e.g., web servers, email servers, databases,or storage arrays), relationships therebetween, as well as higher-levelservices that involve multiple individual configuration items.

Placing the tasks in task list 502 may trigger or otherwise cause proxyservers 312 to begin discovery. Alternatively or additionally, discoverymay be manually triggered or automatically triggered based on triggeringevents (e.g., discovery may automatically begin once per day at aparticular time).

In general, discovery may proceed in four logical phases: scanning,classification, identification, and exploration. Each phase of discoveryinvolves various types of probe messages being transmitted by proxyservers 312 to one or more devices in managed network 300. The responsesto these probes may be received and processed by proxy servers 312, andrepresentations thereof may be transmitted to CMDB 500. Thus, each phasecan result in more configuration items being discovered and stored inCMDB 500.

In the scanning phase, proxy servers 312 may probe each IP address inthe specified range of IP addresses for open Transmission ControlProtocol (TCP) and/or User Datagram Protocol (UDP) ports to determinethe general type of device. The presence of such open ports at an IPaddress may indicate that a particular application is operating on thedevice that is assigned the IP address, which in turn may identify theoperating system used by the device. For example, if TCP port 135 isopen, then the device is likely executing a WINDOWS® operating system.Similarly, if TCP port 22 is open, then the device is likely executing aUNIX® operating system, such as LINUX®. If UDP port 161 is open, thenthe device may be able to be further identified through the SimpleNetwork Management Protocol (SNMP). Other possibilities exist. Once thepresence of a device at a particular IP address and its open ports havebeen discovered, these configuration items are saved in CMDB 500.

In the classification phase, proxy servers 312 may further probe eachdiscovered device to determine the version of its operating system. Theprobes used for a particular device are based on information gatheredabout the devices during the scanning phase. For example, if a device isfound with TCP port 22 open, a set of UNIX®-specific probes may be used.Likewise, if a device is found with TCP port 135 open, a set ofWINDOWS®-specific probes may be used. For either case, an appropriateset of tasks may be placed in task list 502 for proxy servers 312 tocarry out. These tasks may result in proxy servers 312 logging on, orotherwise accessing information from the particular device. Forinstance, if TCP port 22 is open, proxy servers 312 may be instructed toinitiate a Secure Shell (SSH) connection to the particular device andobtain information about the operating system thereon from particularlocations in the file system. Based on this information, the operatingsystem may be determined. As an example, a UNIX® device with TCP port 22open may be classified as AIX®, HPUX, LINUX®, MACOS®, or SOLARIS®. Thisclassification information may be stored as one or more configurationitems in CMDB 500.

In the identification phase, proxy servers 312 may determine specificdetails about a classified device. The probes used during this phase maybe based on information gathered about the particular devices during theclassification phase. For example, if a device was classified as LINUX®,as a set of LINUX®-specific probes may be used. Likewise if a device wasclassified as WINDOWS® 2012, as a set of WINDOWS®-2012-specific probesmay be used. As was the case for the classification phase, anappropriate set of tasks may be placed in task list 502 for proxyservers 312 to carry out. These tasks may result in proxy servers 312reading information from the particular device, such as basicinput/output system (BIOS) information, serial numbers, networkinterface information, media access control address(es) assigned tothese network interface(s), IP address(es) used by the particular deviceand so on. This identification information may be stored as one or moreconfiguration items in CMDB 500.

In the exploration phase, proxy servers 312 may determine furtherdetails about the operational state of a classified device. The probesused during this phase may be based on information gathered about theparticular devices during the classification phase and/or theidentification phase. Again, an appropriate set of tasks may be placedin task list 502 for proxy servers 312 to carry out. These tasks mayresult in proxy servers 312 reading additional information from theparticular device, such as processor information, memory information,lists of running processes (services), and so on. Once more, thediscovered information may be stored as one or more configuration itemsin CMDB 500.

Running discovery on a network device, such as a router, may utilizeSNMP. Instead of or in addition to determining a list of runningprocesses or other application-related information, discovery maydetermine additional subnets known to the router and the operationalstate of the router's network interfaces (e.g., active, inactive, queuelength, number of packets dropped, etc.). The IP addresses of theadditional subnets may be candidates for further discovery procedures.Thus, discovery may progress iteratively or recursively.

Once discovery completes, a snapshot representation of each discovereddevice and service is available in CMDB 500. For example, afterdiscovery, operating system version, hardware configuration and networkconfiguration details for client devices, server devices, and routers inmanaged network 300, as well as services executing thereon, may bestored. This collected information may be presented to a user in variousways to allow the user to view the hardware composition and operationalstatus of devices, as well as the characteristics of services.

Furthermore, CMDB 500 may include entries regarding dependencies andrelationships between configuration items. More specifically, anapplication that is executing on a particular server device, as well asthe services that rely on this application, may be represented as suchin CMDB 500. For instance, suppose that a database application isexecuting on a server device, and that this database application is usedby a new employee onboarding service as well as a payroll service. Thus,if the server device is taken out of operation for maintenance, it isclear that the employee onboarding service and payroll service will beimpacted. Likewise, the dependencies and relationships betweenconfiguration items may be able to represent the services impacted whena particular router fails.

In general, dependencies and relationships between configuration itemsbe displayed on a web-based interface and represented in a hierarchicalfashion. Thus, adding, changing, or removing such dependencies andrelationships may be accomplished by way of this interface.

Furthermore, users from managed network 300 may develop workflows thatallow certain coordinated activities to take place across multiplediscovered devices. For instance, an IT workflow might allow the user tochange the common administrator password to all discovered LINUX®devices in single operation.

In order for discovery to take place in the manner described above,proxy servers 312, CMDB 500, and/or one or more credential stores may beconfigured with credentials for one or more of the devices to bediscovered. Credentials may include any type of information needed inorder to access the devices. These may include userid/password pairs,certificates, and so on. In some embodiments, these credentials may bestored in encrypted fields of CMDB 500. Proxy servers 312 may containthe decryption key for the credentials so that proxy servers 312 can usethese credentials to log on to or otherwise access devices beingdiscovered.

The discovery process is depicted as a flow chart in FIG. 5B. At block520, the task list in the customer instance is populated, for instance,with a range of IP addresses. At block 522, the scanning phase takesplace. Thus, the proxy servers probe the IP addresses for devices usingthese IP addresses, and attempt to determine the operating systems thatare executing on these devices. At block 524, the classification phasetakes place. The proxy servers attempt to determine the operating systemversion of the discovered devices. At block 526, the identificationphase takes place. The proxy servers attempt to determine the hardwareand/or software configuration of the discovered devices. At block 528,the exploration phase takes place. The proxy servers attempt todetermine the operational state and services executing on the discovereddevices. At block 530, further editing of the configuration itemsrepresenting the discovered devices and services may take place. Thisediting may be automated and/or manual in nature.

The blocks represented in FIG. 5B are for purpose of example. Discoverymay be a highly configurable procedure that can have more or fewerphases, and the operations of each phase may vary. In some cases, one ormore phases may be customized, or may otherwise deviate from theexemplary descriptions above.

V. Example Web Transactions

Web transactions typically involve a client device transmitting arequest for web content (e.g., a web page) to a web server device. Moreparticularly, a web browser application executing on the client devicemay transmit the request in accordance with the HyperText TransportProtocol (HTTP) to a web server application executing on the web serverdevice. The client device may be exemplified by computing device 100,while the web server device may be exemplified by computing device 100or server cluster 200. However, other possibilities exist.

The request may identify the web content, at least in part, by way of aUniform Resource Locator (URL). The URL may be a character string thatspecifies a particular web document available by way of the web serverdevice. In response to receiving the request, the web server device mayidentify the web document.

The web document may take various forms, one of which is that of an HTMLfile. This file may contain a combination of content (e.g., text anddata), markup (embedded delimiters that specify how the content is to beorganized or displayed), and scripts. With respect to the scripts, thesemay be either server-side or client-side, depending on whether they areintended to be executed by the web server device or the client device.

Server-side scripts may be, for instance, PHP HyperText Preprocessor(PHP) scripts that are executed by the web server device to generateHTML (or other content) that is then embedded in the web document beforethe web server transmits the web document to the client device. PHPscripts may contain function calls to a database so that parts of theweb document can be dynamically generated. The database may reside uponthe web server device or on another device accessible to the web serverdevice.

Client-side scripts, on the other hand, may be snippets of JavaScriptcode that are executed by the client device after the client devicereceives the web document. Depending on their purpose, these scripts maybe executed before or after the web document is rendered by the clientdevice into a web page. In some cases, client-side scripts may beexecuted after the rendering of a web page in order to make the web pagemore dynamic. These scripts may respond to user-based events, suchmouse-click or mouse-over events to assist with page navigation or todisplay additional information on the web page. Client-side scriptinghas led to the concept of a “single-page application,” in which a webdocument contains enough client-side functionality to effectively behavelike an application.

While client-side scripting was initially intended to distributeprocessing between client devices and web server devices such that theburden on web server devices is reduced, new ways of using client-sidescripts can instead cause the server-side processing burden to beincreased. In particular, Asynchronous JavaScript and XML (AJAX)technologies allow client-side scripts to make dynamic requests to theweb server device.

As an example, the XMLHttpRequest (XHR) application programminginterface (API) is supported by most web browsers and web servers. XHRallows client-side scripts to dynamically request content from webserver devices so that rendered web pages can be modified. In somecases, a web document may contain a number of client-side scripts that,in combination, include a dozen or more XHR function calls. Each ofthese function calls may involve a separate transaction between theclient device and the web server device. Given that a large number ofXHR function calls can exist per web document, the number of discreterequests that a web server device is subjected to per web document candramatically increase the processing burden on the web server device.

While the discussion of web transactions herein are generally focused ona client-server model in which a web server device provides a webdocument for rendering and display on a display unit (e.g., a screen) ofa client device, other models are possible. The embodiments herein mayalso be able to improve transactions using web-based protocols even ifthe client device does not render the resulting web content for display.Thus, these embodiments may be applicable to machine-to-machinecommunications, as well as other types of transactions.

The aPaaS system described in FIGS. 3-5A may be a particularly suitablecandidate for deploying these embodiments because it may make heavy useof web transactions with client-side scripting. Particularly, one ormore server devices disposed within customer instance 322 may provideweb-based interfaces that allow users in managed network 300 andelsewhere to view the configuration and operational conditions ofmanaged network 300. From this interface, users may be able to triggerdiscovery procedures, view network and device status, and carry outhigher-level procedures (e.g., managing IT, HR, and finance operations).Nonetheless, the embodiments herein may be used to enhance any webtransaction with client-side scripts that make function calls to the webserver device.

VI. Example Batching Procedure for Asynchronous Requests for Web Content

As noted above, asynchronous technologies may be preferred in someinstances over synchronous technologies, as asynchronous requests mayallow the web browser to load a web page more quickly and to performother actions while a request is in the process of being completed.However, the web server device may be subjected to communication andprocessing overhead for each asynchronous request that it receives. Forinstance, in order to obtain all the necessary web content to fullyrender a web document for display, the client device and the web serverdevice may undertake numerous transactions.

To help reduce communication and processing overhead as well as thenumber of client-server transactions per web document, a procedure forbatching asynchronous requests for web content may be implemented. Sucha procedure can thus improve the performance of the web server deviceand the client-server model as a whole.

FIG. 6 illustrates operations of an example batching procedure in theform of a message flow diagram. As shown, FIG. 6 illustrates variousclient-server transactions between a client device 600 and a web serverdevice 602. Some of the transactions shown in FIG. 6 may involve adatabase device 604 as well.

The operations described herein relating to batching asynchronousrequests can be implemented in the context of other models for webtransactions. Furthermore, other example batching procedures arepossible, perhaps including additional, less, or different operationsthan those illustrated in FIG. 6.

In accordance with the operations of FIG. 6, a client device 600 mayreceive a web document from the web server device 602 (not explicitlyshown in FIG. 6). The web document may contain a number of asynchronousfunction calls, such as AJAX (e.g., XHR) function calls, that allow theclient device 600 to make dynamic requests to the web server device 602.For example, a web document may contain four asynchronous function callsin total: Call 1, Call 2, Call 3, and Call 4. After receiving the webdocument, the client device 600 may read the function calls by scanningthe web document to identify the function calls therein. In someembodiments, “scanning” may refer to identifying relevant function callsduring execution of the script in which they are contained.

The function calls that the client device 600 may read may be of aparticular type, and the client device 600 may attempt to identify thetype of each function call it reads. A particular type of function callmay include a family or set of related function calls that all involvetransmitting asynchronous requests to the web server device 602. Todetermine what type of function call is being read, the client device600 may look to the name of the function call, the general format of thefunction call (which could be defined by a regular expression, forinstance), and/or the form or content of the function call's parameters.

In any event, for each function call that the client device 600 reads,the client device 600 may add a representation of the function call to aclient-side queue stored in memory accessible by the client device 600.For example, at step 606, the client device 600 reads three functioncalls (Call 1, Call 2, and Call 3), and stores a representation of eachfunction call in the client-side queue. In some embodiments, a functioncall representation may remain in the client-side queue until the clientdevice 600 has received a result for the function call.

In some embodiments, the client device 600 may not add a function callrepresentation to the client-side queue until the client device 600 hasdetermined that the corresponding function call is eligible forbatching. In order to determine whether the function call is eligiblefor batching, the client device 600 may consider various factors. Forexample, the client device 600 may maintain or otherwise have access toa whitelist and/or blacklist of function call types, and may use thatwhitelist and/or blacklist to determine whether the current functioncall type is a whitelisted or blacklisted function call type.Accordingly, the client device 600 would batch whitelisted function calltypes, and would not batch blacklisted function call types.

As another example, the client device 600 may maintain or otherwise haveaccess to a whitelist and/or blacklist of endpoints, and may use thatwhitelist and/or blacklist to determine whether the function callinvolves an attempt to access the whitelisted or blacklisted endpoint.In either list, an endpoint may be identified by a URL, IP address, or adomain name to which the endpoint corresponds, for instance.Accordingly, the client device 600 would batch function calls withwhitelisted endpoints, and would not batch function calls withblacklisted endpoints.

As yet another example, the web document may include code that indicatesto the client device 600 that the function call is not eligible forbatching.

Further, as another example, the client device 600 may be pre-configuredwith a limit on how many function call representations can be in theclient-side queue at once, and thus the client device 600 may determinethat a function call is ineligible for batching if the client-side queueis at the pre-configured limit.

Still further, as another example, the client device 600 may determinethat a function call (more particularly, all function calls) areineligible for batching if the client device 600 determines thatbatching has been disabled for the web document. Batching may bedisabled for the web document for various reasons. For instance,typically once a web page has been loaded in its entirety, subsequentfunction calls may occur one at a time (e.g., one function callrepresentation in the client-side queue at a time) or otherwise lessoften than when a web page is being loaded. Therefore, if batching isenabled even after a web page has been loaded in its entirety, there maybe a resulting undesirable delay in the execution of a subsequentfunction call, since the client device 600 would wait for multiplefunction call representations to be placed into the client-side queuebefore transmitting the requests in a batch. Accordingly, once a webpage has been loaded in its entirety, the client device 600 may disablebatching so that the client device 600 will not delay in executingfunction calls.

Batching can be disabled or enabled in various ways. In someembodiments, the client device 600 (or other computing device that iscommunicatively linked to the client device 600) may be configured toprovide global settings for enabling or disabling batching on aper-customer-instance basis. For example, with respect to FIG. 3, theglobal settings may be set such that batching is enabled for customerinstances 322 and 324, but disabled for customer instances 326 and 328.In other embodiments, the client device 600 may be configured to providemultiple web browsers with global settings for enabling or disablingbatching. For instance, using these settings, a customer may enablebatching for one web browser, but disable batching for another webbrowser. Batching could be disabled or enabled in other ways as well.

The client device 600 may continue to read the function calls and addrepresentations of them in the client-side queue until the client device600 detects that a trigger event has occurred. In response to detectingthe trigger event, the client device 600 may transmit, to the web serverdevice 602, a message including asynchronous requests for each functioncall representation that is currently present in the client-side queueat the time the client device 600 detects the trigger event.

For example, assume that, in the scenario illustrated in FIG. 6,representations of Calls 1, 2, and 3 are in the client-side queue whenclient device 600 detects the trigger event. Thus, at step 608, clientdevice 600 transmits, to the web server device 602, a batch of threeasynchronous requests (Request 1, Request 2, and Request 3). As notedabove, a given “batch” of asynchronous requests may include two or moreasynchronous requests combined in some fashion into the form of a singlemessage including data representative of the requests. A batch couldtake other forms as well.

The trigger event may take various forms. For example, the act ofdetecting the trigger event may occur when the client device 600 detectsthat a predetermined time period has expired. The predetermined timeperiod may begin once the client device 600 begins receiving the webdocument, or may begin at another point in time, such as once the clientdevice 600 adds the first function call representation to theclient-side queue, once the client device 600 has received resultsassociated with a previous batch of requests, once the web document hasbeen received in its entirety, or before the client device 600 beginsreading the function calls. In some embodiments, the predeterminedamount of time may have a value in a range of 30 milliseconds (ms) to 60ms. The range may be determined based on various factors, such as theestimated execution time of a typical request, an estimated amount oftime that it will take to load the entire web page, and/or a round-triptime between the client device 600 and the web server device 602.

Each of these factors may be measured in various ways. For example, theweb server device 602 may determine the estimated execution time of atypical request to be an average of the execution times of pastrequests. To facilitate this, the web server device 602 may maintain ahistory of execution times of past requests, as described in more detailbelow. As another example, the web server device 602 may determine theestimated amount of time that it will take to load the entire web pagebased on a history of loading times for past web pages, or perhaps basedon a size of the current web document. As yet another example, the webserver device 602 (or client device 600) may determine the round-triptime by transmitting a ping message or other type of message to theclient device 600 (or web server device 602), and measuring the time ittakes for a response to be received. Other techniques for measuringthese factors are possible as well.

As another example, the act of detecting the trigger event may occurwhen the client device 600 detects that a number of function calls thatthe client device 600 has read meets or exceeds a predeterminedthreshold. For instance, the predetermined threshold may be threefunction calls, and thus the client device 600 may transmit, to the webserver device 602, a batch of three asynchronous requests in response tothe client device 600 detecting that the client device 600 has readthree function calls.

As other examples, the act of detecting the trigger event may occur whenthe client device 600 detects that the web page has been loaded in itsentirety, or when the client device 600 detects that it has receivedresults associated with a previous batch of requests. Other examples arepossible as well.

In response to receiving the batch of asynchronous requests from theclient device 600, the web server device 602 may sort the requests inorder of their estimated execution times. For instance, in someembodiments, the web server device 602 may sort the requests in orderfrom the least estimated execution time to the greatest estimatedexecution time. In other embodiments, the web server device 602 may sortthe requests in a different order.

An execution time for a given request may begin when the web serverdevice 602 begins processing the request, and may end when the webserver device 602 obtains a result associated with the request.Alternatively, an execution time may begin when the web server device602 begins processing the request, and may end when the web serverdevice 602 transmits, to the client device 600, the result associatedwith the request. Other possible starting and ending points forexecution times are possible as well.

To help sort the requests, the web server device 602 may record andmaintain, in memory accessible by the web server device 602, executiontimes for past asynchronous requests that the web server device 602 hasprocessed, and may use these recorded execution times as a basis fordetermining the estimated execution times for the batched requests thatthe web server device 602 has received. More particularly, the webserver device 602 may maintain a history of execution times for thedifferent types of past asynchronous requests, and may use this historyas a basis for determining the estimated execution times for the batchedrequests that the web server device 602 has received.

Just as each asynchronous function call has a type, each asynchronousrequest may have a type as well. In order to help the web server device602 to determine what type of request it is receiving, the client device600 may be configured to include, in a message representing the request,an identifier or other data that identifies to the web server device 602the type of function call to which the request corresponds. Accordingly,the web server device 602 may be configured to determine, from themessage, which type of request it has received. For example, the webserver device 602 may be pre-configured with a table or other data thatmaps function call type identifiers to respective request types. Assuch, using the identifiers, the web server device 602 may refer to thetable in order to determine what types of request it has received.Similarly, in the batching procedure, the client device 600 may includea respective identifier for each request in the batch message so thatthe web server device 602 can determine, from the message, which typesof requests are included in the batch.

To illustrate an example of how web server device 602 might maintain ahistory of execution times per request type, consider a scenario inwhich there are three types of asynchronous requests—Type 1, Type 2, andType 3. In this scenario, the web server device 602 may maintain ahistory including execution times for (i) past asynchronous requests ofType 1, (ii) past asynchronous requests of Type 2, and (iii) pastasynchronous requests of Type 3. Consequently, if web server device 602receives a batch of three asynchronous requests including a Type 1request, a Type 2 request, and a Type 3 request, the web server device602 may (i) estimate an execution time for the Type 1 request based onthe history of execution times for past Type 1 requests, (ii) estimatean execution time for the Type 2 request based on the history ofexecution times for past Type 2 requests, and (iii) estimate anexecution time for the Type 3 request based on the history of executiontimes for past Type 3 requests.

In some embodiments, the history of execution times for a given type ofrequest may include an average execution time for that type of request.In these embodiments, the act of the web server device 602 determiningan estimated execution time for a request of a given type may involvethe web server device 602 using the average execution time for that typeof request as the estimated execution time. For example, if the webserver device 602 has received a Type 1 request in the batch and theaverage execution time for past Type 1 requests is 8 ms, the web serverdevice 602 may determine that the estimated execution time for the Type1 request should be 8 ms.

In some embodiments, the average execution time may be a moving averagethat is based on a subset of execution times in the history. Forinstance, the subset of execution times may include the execution timesof the most recent three requests (or other predetermined number ofrequests that the web server device 602 is configured to take intoaccount in determining the moving average). As a more specific example,consider a scenario in which, for a given type of request, the executiontimes of the three most recent requests, from most recent to leastrecent, are: 10 ms, 7 ms, and 13 ms. In this scenario, the averageexecution time for that type of request is 10 ms. But later in thisscenario, after the web server device 602 receives and executes anotherrequest of the type that takes 15 ms to execute, the execution times ofthe three most recent requests, from most recent to least recent, are:15 ms, 10 ms, and 7 ms. Thus, the web server device 602 may update theaverage execution time for that type of request to be approximately10.67 ms.

As the web server device 602 continues to process requests over time,the web server device 602 may measure execution times of the requestsand update the history accordingly, which may involve updating theaverage execution time for a type of request, as discussed above.

As noted above, upon receipt of the batch of requests, the web serverdevice 602 may sort the batch of requests in order from the leastestimated execution time to the greatest estimated execution time.Referring back to FIG. 6, for instance, the web server device 602 maydetermine, using one or more of the techniques described above, that theestimated execution time of Request 1 is greater than the estimatedexecution time of Request 2, but less than the estimated execution timeof Request 3. As such, at step 610, the web server device 602 sorts thebatch of requests such that Request 3 is first to be processed, followedby Request 1, and then followed by Request 2.

It is possible in practice for latency issues to arise when processingof a batch of asynchronous requests. These issues might be caused by aphenomenon referred to as “head-of-line blocking.” Head-of-line blockingmight occur when the web server device 602 has a batch of requests toprocess, but cannot send results for the batch until all requests havebeen processed—even if one or more of the requests are less importantthan the rest. For example, the web server device 602 may have a batchof ten requests to process, nine of which have an estimated executiontime of 100 ms, and one of which has an estimated execution time of 2seconds. In addition, the tenth, 2-second request might be relativelyunimportant (e.g., low priority) compared to the nine 100-ms requests.Thus, in this scenario, results for the batch of ten requests may not bereturned to the client device 100 until all requests have beenprocessed, thereby taking a longer amount of time to return the resultsfor the nine important (e.g., high priority) requests.

This phenomenon may be especially problematic in a scenario where theweb server device 602 is configured to process a batch of requests foronly a predetermined amount of time, and to then sent results once thepredetermined amount of time expires. In the scenario described above,for instance, the predetermined period of time might expire in themiddle of (or after) processing the 2-second request, and beforeprocessing most, if not all, of the nine important 100-ms requests.Accordingly, in order to mitigate the latency caused by this phenomenon,the web server device 602 in this batching procedure may sort therequests in order from the least estimated execution time to thegreatest estimated execution time, so that the web server device 602processes the fastest requests first.

In some embodiments, the web server device 602 may be configured to sortthe requests based on other factors as well. For instance, the webserver device 602 may sort a given request based on (i) a predefinedpriority value corresponding to the request (or corresponding to thetype of the request), (ii) an amount of time that the request was storedin the client-side queue, (iii) a payload size of the request, and/or(iv) an estimated payload size of the result of the request. Otherfactors are possible as well.

Sorting based on each of these factors may have distinct advantages. Forexample, by sorting based on the payload sizes of the requests, the webserver device 602 can prioritize processing of larger-sized inboundrequests to reduce network traffic. To illustrate how such sorting mightreduce network traffic, consider a scenario in which a batch includesthree requests: Request A having a payload size of 500 kilobytes and anestimated execution time of 500 ms, Request B having a payload size of200 bytes an estimated execution time of 20 ms, and Request C having apayload size of 2 kilobytes and an estimated execution time of 250 ms.In this scenario, if the web server device 602 sorts the requests inorder of their estimated execution times from least to greatest (i.e.,B, C, A), the web server device 602 might not complete processing ofeach request, as described in greater detail below, and return only theresults of Requests B and C. Thus, the client device 600 maysubsequently send Request A again to be processed, thereby creating atotal network traffic payload for the requests to be 1002.2 kilobytes.However, if the web server device 602 sorts the requests in order oftheir payload sizes (i.e., A, B, C), the web server device 602 may stillnot complete the processing of each request, but would complete RequestA, and thus client device 600 would not need to re-send Request A,thereby reducing network traffic for the requests by up to 500kilobytes. For instance, the web server device 602 may return resultsfor only Request A, and the client device 600 would then send a batchwith Requests B and C for a total network traffic payload of 504.4kilobytes.

As another example, sorting based on the estimated payload sizes of theresults of the requests may be useful when there is a slow networkconnection, and accordingly, the web server device 602 can prioritizeprocessing of smaller-sized results over larger-sized results. This may,in effect, make it appear to a user as though the web page is loadingquickly despite the slow network connection. Any one or more of thesefactors can be used for sorting in addition to, or alternative to, theestimated execution times described above. Further, the web serverdevice 602 may be configured to maintain and/or access data related toany one or more of these factors, so as to help the web server device602 sort using these factors.

After the web server device 602 has sorted the requests in a particularorder, the web server device 602 may then process the requests in thatparticular order. For instance, the web server device 602 may start withthe request estimated to take the least amount of time. As shown in FIG.6, for example, the web server device 602 may first process Request 3,then Request 1, and then Request 2. When the web server device 602processes a request and obtains a result, the web server device 602 maystore the result in a server-side queue in memory accessible by the webserver device 602.

The act of processing a request may take various forms. In someembodiments, the web server device 602 may access a database thatresides upon the web server device 602 to obtain a result associatedwith the request. In other embodiments, the web server device 602 maytransmit, to a separate database (e.g., database device 604) accessibleto the web server device 602, a message containing the request. Inresponse to receiving the message, the database device 604 may look upthe result associated with the request and transmit to the web serverdevice 602 a response message containing the result.

In some embodiments, the web server device 602 may process multiplerequests at a time in one or more of the manners discussed above. Forexample, the web server device 602 may transmit, to the database device604, a message containing the batch of requests. In response toreceiving the message, the database device 604 may look up the resultsassociated with the requests and transmit to the web server device 602 aresponse message containing the results.

The web server device 602 may process the batch of requests as ordereduntil the web server device 602 detects that a condition has been met.For instance, in some embodiments, the web server device 602 may processthe requests until either a predetermined amount of time has expired, orall of the requests have been processed (i.e., all of the requests inthe current batch). When either of these conditions is met, the webserver device 602 may responsively stop processing the batch ofrequests, complete the current request that it is processing, and thentransmit, to the client device 600, results associated with the requestsfrom the batch that have been processed up to the point where the webserver device 602 detected that one of the conditions was met.

The predetermined amount of time may vary. For example, thepredetermined amount of time may have a value in a range of 10 ms to 50ms. The range may be determined based on various factors, such as around-trip time between the client device 600 and the web server device602 (which the web server device 602 or the client device 600 maymeasure in the manner discussed above, for instance). Further, thepredetermined amount of time may be measured from various points intime, such as from the time the web server device 602 begins processingthe batch of requests (e.g., when the web server device 602 beginsprocessing the first request as ordered), from the time the web serverdevice 602 receives the batch of requests, or perhaps from a differenttime.

In order for the web server device 602 to determine whether thepredetermined amount of time has expired, the web server device 602 mayperiodically check whether the predetermined amount of time has expired.For instance, the web server device 602 may check whether thepredetermined amount of time has expired each time the web server device602 has completed processing one request, or perhaps each time the webserver device 602 has completed processing two or another predeterminednumber of requests.

In some embodiments, the web server device 602 may be configured suchthat, when the predetermined amount of time expires, an interruptroutine will be triggered. This interrupt may in turn cause the webserver device 602 to stop processing the batch of requests, complete thecurrent request that it is processing, and then transmit, to the clientdevice 600, results associated with the requests from the batch thathave been processed up until the interrupt routine was triggered.

Referring back to FIG. 6, at step 612, the web server device 602processes Request 3 by transmitting, to database device 604, a messagecontaining the request, then receiving, from the database device 604, aresponse message containing the result for Request 3 (which the webserver device 602 may then store in a server-side queue). At step 614,the web server device 602 checks how much time has elapsed and whetherthe predetermined amount of time has expired. Further, at step 616, theweb server device 602 then processes Request 1 in the same manner asRequest 3. Then, at step 618, the web server device 602 determines thatthe predetermined amount of time has expired and stops processing therequests. At step 620, the web server device transmits to the clientdevice 600 the results for the requests that have been processed thusfar (Result 3 for Request 3, and Result 1 for Request 1).

In a scenario where the client device 600 does not receive results foreach request in the batch that the client device 600 sent to the webserver device 602, the client device 600 may keep, in the client-sidequeue, a representation of the function call associated with theremaining request. By way of example, in the scenario illustrated inFIG. 6, the client device 600 would keep a representation of Call 2 inthe client-side queue because the web server device 602 did not providea result for Request 2, and returned results for only Requests 1 and 3.

At some point, either while processing a batch of requests, or afterprocessing the batch of requests, the client device 600 may read otherfunction calls and store representation of the function calls in theclient-side queue. For example, at step 622, the client device 600 readsCall 4 and stores a representation of Call 4 in the client-side queue,which occurs while the web server device 602 is processing the batch ofrequests.

In some embodiments, the client device 600 and the web server device 602may repeat the batching procedure described above until the clientdevice 600 determines that either results have been returned for all ofthe function calls of the web document (e.g., the web document is fullyrendered by the client device into a web page), or the client-side queueis empty.

Consider, for example, a scenario in which the client device 600 isconfigured to repeat the batching procedure until the client device 600determines that the client-side queue is empty. In this scenario, ifrepresentations of other function calls remain in the client-side queueafter the client device 600 receives results associated to one batch ofrequests, the client device 600 may initiate the batching procedureagain by transmitting, to the web server device 602, a subsequent batchof requests. This subsequent batch may contain any requests that were inthe first batch but not processed and/or any requests corresponding toany new function calls that the client device 600 read while the webserver device 602 was processing the first batch. For example, at step624, client device 600 initiates the batching procedure again bytransmitting, to the web server device 602, a new batch of requestscorresponding to Call 2 (which wasn't processed in the first batch) andCall 4 (which was received after the first batch was sent).

To facilitate one or more of the operations discussed above, the webdocument may contain various client-side scripts that specify values forthe parameters used in the batching procedure, such as values for thepredetermined time period or threshold used for detecting a triggerevent, or values for the predetermined amount of time used forprocessing a given batch. These client-side scripts may take the form ofa block of JavaScript code in an HTML file.

VII. Example Operations

A. Example Web Server Device Operations

FIG. 7A is a flow chart illustrating an example embodiment of thebatching procedure discussed above. The process illustrated by FIG. 7Amay be carried out by a computing device, such as computing device 100,and/or a cluster of computing devices, such as server cluster 200.However, the process can be carried out by other types of devices ordevice subsystems. For example, the process could be carried out by aportable computer, such as a laptop or a tablet device.

The embodiments of FIG. 7A may be simplified by the removal of any oneor more of the features shown therein. Further, these embodiments may becombined with features, aspects, and/or implementations of any of theprevious figures or otherwise described herein.

Block 700 may involve receiving a message containing a plurality ofasynchronous requests for web content, where the plurality ofasynchronous requests is received from a client device that was providedwith a web document from which the web content is at least in partderivable.

Block 702 may involve sorting the plurality of asynchronous requestsinto an ordering based on respective estimated execution times of theplurality of asynchronous requests, where the ordering is from leastestimated execution time to greatest estimated execution time.

Block 704 may involve processing the plurality of asynchronous requestsas ordered until either a predetermined amount of time measured from thebeginning of the processing has expired, or all of the plurality ofasynchronous requests have been processed.

Block 706 may involve transmitting, to the client device, resultsassociated with the plurality of asynchronous requests that wereprocessed.

In some embodiments, the operations of FIG. 7A may be performed at leastin part by a web server device, such as web server device 602. The webserver device may be located in the same network as the client device orin a different network.

In some embodiments, prior to receiving the message containing theplurality of asynchronous requests, the web server device may record, ina memory of the web server device, an execution time for a pastasynchronous request, where one or more of the estimated execution timesare based on the recorded execution time. In these embodiments, anexecution time that is recorded may begin when the web server devicebegan processing the past asynchronous request and end when the webserver device obtained a result associated with the past asynchronousrequest.

In some embodiments, an asynchronous request of the plurality ofasynchronous requests may have a type, and the web server device maymaintain, in a memory of the web server device, a history of executiontimes for past asynchronous requests of the type. The web server devicemay also determine the estimated execution time for the asynchronousrequest based on the history of execution times for past asynchronousrequests of the type.

In some embodiments, the history may include an average execution timefor the type of asynchronous request, and the act of determining theestimated execution time for the asynchronous request based on thedetermined execution time for the type of asynchronous request mayinvolve determining the estimated execution time to be the averageexecution time for the type of asynchronous request. In suchembodiments, the web server device may measure an execution time for theasynchronous request and, based on the measured execution time for theasynchronous request, determine an update to the average execution timefor the type of asynchronous request.

In some embodiments, the act of processing the plurality of asynchronousrequests as ordered may involve transmitting, to a database device, amessage containing the plurality of asynchronous requests as ordered,and then receiving, from the database, a response message containing theresults associated with the plurality of asynchronous requests.

In some embodiments, the message may be a first message, and theplurality of asynchronous requests may be a first plurality ofasynchronous requests. In such embodiments, the web server device mayreceive, from the client device, a second message containing a secondplurality of asynchronous requests for web content. The second messagemay further contain any asynchronous requests of the first plurality ofasynchronous requests that were not processed by the web server device(or by another device, such as the database device).

B. Example Client Device Operations

FIG. 7B is a flow chart illustrating an example embodiment of thebatching procedure discussed above. The process illustrated by FIG. 7Bmay be carried out by a computing device, such as computing device 100,and/or a cluster of computing devices, such as server cluster 200.However, the process can be carried out by other types of devices ordevice subsystems. For example, the process could be carried out by aportable computer, such as a laptop or a tablet device.

The embodiments of FIG. 7B may be simplified by the removal of any oneor more of the features shown therein. Further, these embodiments may becombined with features, aspects, and/or implementations of any of theprevious figures or otherwise described herein.

Block 750 may involve receiving a web document, where the web documentincludes script content defining a first plurality of asynchronousfunction calls for web content accessible by way of a web server deviceand a second plurality of asynchronous function calls for web contentaccessible by way of the web server device, and where the client devicereceives the web document from the web server device.

Block 752 may involve transmitting, to the web server device, a firstmessage containing an ordered representation of the first plurality ofasynchronous function calls.

Block 754 may involve receiving, from the web server device, resultsassociated with a first subset of the first plurality of asynchronousfunction calls that were processed by the web server device, where asecond subset of the first plurality of asynchronous function calls werenot processed by the web server device, and where the second subset ofthe first plurality of asynchronous function calls include one or moreasynchronous function calls that appear before one or more of the firstplurality of asynchronous function calls in the ordered representation.

Block 756 may involve transmitting, to the web server device, a secondmessage containing a representation of the second subset of the firstplurality of asynchronous function calls and the second plurality ofasynchronous function calls.

In some embodiments, the operations of FIG. 7B may be performed at leastin part by a client device, such as client device 600. As noted above,the client device may be located in the same network as the web serverdevice or in a different network.

In some embodiments, the client device may maintain, in a memory of theclient device, a queue representing asynchronous requests for webcontent, where the asynchronous requests correspond to asynchronousfunction calls defined by the script content. After transmitting thesecond message containing the representation of the second subset of thefirst plurality of asynchronous function calls and the second pluralityof asynchronous function calls, the client device may receive resultsassociated with the second subset of the first plurality of asynchronousfunction calls and the second plurality of asynchronous function calls.The client device may then determine that the queue is empty and thatthe web page has completed loading.

In some embodiments, the client device may maintain, in a memory of theclient device, a queue representing asynchronous requests for webcontent, where the asynchronous requests correspond to asynchronousfunction calls defined by the script content. Prior to transmitting thefirst message containing the ordered representation of the firstplurality of asynchronous function calls, the client device may detect atrigger event. In response to detecting the trigger event, and furtherin response to the first plurality of asynchronous function calls beingall asynchronous function calls present in the queue when the triggerevent is detected, the client device may transmit, to the web serverdevice, the first message containing the ordered representation of thefirst plurality of asynchronous function calls.

The act of detecting the trigger event may involve detecting that apredetermined time period has expired, where the predetermined timeperiod starts when the client device begins receiving the web document.Additionally or alternatively, detecting the trigger event may involvedetecting that a number of asynchronous function calls read by theclient device exceeds a predetermined threshold. Additionally oralternatively, detecting the trigger event may involve detecting thatall of the first plurality of asynchronous function calls has beenreceived.

VIII. Conclusion

The present disclosure is not to be limited in terms of the particularembodiments described in this application, which are intended asillustrations of various aspects. Many modifications and variations canbe made without departing from its scope, as will be apparent to thoseskilled in the art. Functionally equivalent methods and apparatuseswithin the scope of the disclosure, in addition to those describedherein, will be apparent to those skilled in the art from the foregoingdescriptions. Such modifications and variations are intended to fallwithin the scope of the appended claims.

The above detailed description describes various features and operationsof the disclosed systems, devices, and methods with reference to theaccompanying figures. The example embodiments described herein and inthe figures are not meant to be limiting. Other embodiments can beutilized, and other changes can be made, without departing from thescope of the subject matter presented herein. It will be readilyunderstood that the aspects of the present disclosure, as generallydescribed herein, and illustrated in the figures, can be arranged,substituted, combined, separated, and designed in a wide variety ofdifferent configurations.

With respect to any or all of the message flow diagrams, scenarios, andflow charts in the figures and as discussed herein, each step, block,and/or communication can represent a processing of information and/or atransmission of information in accordance with example embodiments.Alternative embodiments are included within the scope of these exampleembodiments. In these alternative embodiments, for example, operationsdescribed as steps, blocks, transmissions, communications, requests,responses, and/or messages can be executed out of order from that shownor discussed, including substantially concurrently or in reverse order,depending on the functionality involved. Further, more or fewer blocksand/or operations can be used with any of the message flow diagrams,scenarios, and flow charts discussed herein, and these message flowdiagrams, scenarios, and flow charts can be combined with one another,in part or in whole.

A step or block that represents a processing of information cancorrespond to circuitry that can be configured to perform the specificlogical functions of a herein-described method or technique.Alternatively or additionally, a step or block that represents aprocessing of information can correspond to a module, a segment, or aportion of program code (including related data). The program code caninclude one or more instructions executable by a processor forimplementing specific logical operations or actions in the method ortechnique. The program code and/or related data can be stored on anytype of computer readable medium such as a storage device including RAM,a disk drive, a solid state drive, or another storage medium.

The computer readable medium can also include non-transitory computerreadable media such as computer readable media that store data for shortperiods of time like register memory and processor cache. The computerreadable media can further include non-transitory computer readablemedia that store program code and/or data for longer periods of time.Thus, the computer readable media may include secondary or persistentlong term storage, like ROM, optical or magnetic disks, solid statedrives, compact-disc read only memory (CD-ROM), for example. Thecomputer readable media can also be any other volatile or non-volatilestorage systems. A computer readable medium can be considered a computerreadable storage medium, for example, or a tangible storage device.

Moreover, a step or block that represents one or more informationtransmissions can correspond to information transmissions betweensoftware and/or hardware modules in the same physical device. However,other information transmissions can be between software modules and/orhardware modules in different physical devices.

The particular arrangements shown in the figures should not be viewed aslimiting. It should be understood that other embodiments can includemore or less of each element shown in a given figure. Further, some ofthe illustrated elements can be combined or omitted. Yet further, anexample embodiment can include elements that are not illustrated in thefigures.

While various aspects and embodiments have been disclosed herein, otheraspects and embodiments will be apparent to those skilled in the art.The various aspects and embodiments disclosed herein are for purpose ofillustration and are not intended to be limiting, with the true scopebeing indicated by the following claims.

What is claimed is:
 1. A system, comprising: one or more hardwareprocessors; and a non-transitory memory, the non-transitory memorystoring instructions that, when executed by the one or more hardwareprocessors, causes the one or more hardware processors to performoperations comprising: receiving, from a client device, a messagecomprising a plurality of asynchronous requests for web content; sortingthe plurality of asynchronous requests into an ordering based onrespective estimated execution times of the plurality of asynchronousrequests; processing the plurality of asynchronous requests as ordereduntil a predetermined amount of time has expired or until all of theplurality of asynchronous requests are processed within thepredetermined amount of time, wherein the predetermined amount of timeis measured from a beginning of the processing or when the message isreceived; and transmitting, to the client device, results associatedwith one or more processed asynchronous requests of the plurality ofasynchronous requests that were processed within the predeterminedamount of time, wherein any remaining asynchronous requests notprocessed during the predetermined amount of time are processed during asubsequent predetermined amount of time.
 2. The system of claim 1,wherein the operations comprise: prior to receiving the messagecomprising the plurality of asynchronous requests, storing, in thenon-transitory memory, an execution time for a past asynchronousrequest, wherein the execution time began when the system beganprocessing the past asynchronous request and ended when the systemobtained a result associated with the past asynchronous request, andwherein the respective estimated execution times are based at least inpart on the stored execution time.
 3. The system of claim 1, wherein theoperations comprise: determining a respective type associated with eachasynchronous request of the plurality of asynchronous requests; groupingeach asynchronous request of the plurality of asynchronous requestsbased on the respective type associated with each asynchronous requestof the plurality of asynchronous requests; and ordering the plurality ofasynchronous requests from least execution time to greatest executiontime based on the grouping.
 4. The system of claim 1, wherein a group ofthe plurality of asynchronous requests is associated with a type, andwherein the operations comprise: receiving a history of execution timesfor past asynchronous requests of the type; and determining therespective estimated execution time for the group of the plurality ofasynchronous requests associated with the type based on the history ofexecution times for past asynchronous requests of the type.
 5. Thesystem of claim 4, wherein the history comprises an average executiontime for the type, and wherein determining the respective estimatedexecution time for the group comprises determining the respectiveestimated execution time to be the average execution time for the type.6. The system of claim 5, wherein the operations comprise: measuring arespective execution time for each asynchronous request of the pluralityof asynchronous requests; and based on the respective measured executiontime for each asynchronous request, modifying the average execution timefor the type.
 7. The system of claim 1, wherein processing the pluralityof asynchronous requests comprises: transmitting, to a database device,the message comprising the plurality of asynchronous requests asordered; and receiving, from the database device, a response messagecomprising the results associated with the plurality of asynchronousrequests.
 8. The system of claim 1, wherein the message comprises afirst message, and wherein the plurality of asynchronous requestscomprises a first plurality of asynchronous requests, the operationscomprising: receiving, from the client device, a second messagecomprising a second plurality of asynchronous requests for web content.9. The system of claim 8, wherein the second message comprises anyremaining asynchronous requests not processed during the predeterminedamount of time.
 10. The system of claim 1, wherein the predeterminedamount of time comprises a time duration between 10 milliseconds (ms)and 60 ms.
 11. The system of claim 1, wherein the predetermined amountof time is based on round-time associated with communication with theclient device.
 12. A non-transitory computer-readable medium comprisingcomputer-readable code, that when executed by one or more processors,causes the one or more processors to perform operations comprising:receiving, from a client device, a message comprising a plurality ofasynchronous requests for web content; sorting the plurality ofasynchronous requests into an ordering based on respective estimatedexecution times of the plurality of asynchronous requests; processingthe plurality of asynchronous requests as ordered until a predeterminedamount of time has expired or until all of the plurality of asynchronousrequests are processed within the predetermined amount of time, andwherein the predetermined amount of time is measured from a beginning ofthe processing or when the message is received; and transmitting, to theclient device, results associated with one or more processedasynchronous requests of the plurality of asynchronous requests thatwere processed within the predetermined amount of time, wherein anyremaining asynchronous requests not processed during the predeterminedamount of time are processed during a subsequent predetermined amount oftime.
 13. The non-transitory computer-readable medium of claim 12,wherein the operations comprise: prior to receiving the messagecomprising the plurality of asynchronous requests, storing, in a memoryof a web server device executing the computer-readable code, anexecution time for a past asynchronous request, wherein the executiontime began when the web server device began processing the pastasynchronous request and ended when the web server device obtained aresult associated with the past asynchronous request, and wherein therespective estimated execution times are based at least in part on thestored execution time.
 14. The non-transitory computer-readable mediumof claim 12, wherein the operations comprise: determining a respectivetype associated with each asynchronous request of the plurality ofasynchronous requests; grouping each asynchronous request of theplurality of asynchronous requests based on the respective typeassociated with each asynchronous request of the plurality ofasynchronous requests; and ordering the plurality of asynchronousrequests from least execution time to greatest execution time based onthe grouping.
 15. The non-transitory computer-readable medium of claim12, wherein a group of the plurality of asynchronous requests isassociated with a type, and wherein the operations comprise: receiving ahistory of execution times for past asynchronous requests of the type;and determining the respective estimated execution time for the group ofthe plurality of asynchronous requests associated with the type based onthe history of execution times for past asynchronous requests of thetype.
 16. The non-transitory computer-readable medium of claim 15,wherein the history comprises an average execution time for the type,wherein determining the respective estimated execution time for thegroup comprises determining the respective estimated execution time tobe the average execution time for the type, and wherein the operationscomprise: measuring a respective execution time for each asynchronousrequest of the plurality of asynchronous requests; and based on therespective measured execution time for each asynchronous request,modifying the average execution time for the type.
 17. A method,comprising: receiving, from a web server device, via a client device, aweb document, wherein the web document comprises scripts defining: afirst plurality of asynchronous function calls for first web contentaccessible by the web server device; and a second plurality ofasynchronous function calls for second web content accessible by the webserver device; transmitting, to the web server device, via the clientdevice, a first message comprising an ordered representation of thefirst plurality of asynchronous function calls; receiving, from the webserver device, via the client device, results associated with a firstsubset of the first plurality of asynchronous function calls that wereprocessed by the web server device, wherein a second subset of the firstplurality of asynchronous function calls were not processed by the webserver device, and wherein the second subset of the first plurality ofasynchronous function calls comprises one or more asynchronous functioncalls that appear before one or more of the first plurality ofasynchronous function calls in the ordered representation; andtransmitting, to the web server device, via the client device, a secondmessage comprising a representation of the second subset of the firstplurality of asynchronous function calls and the second plurality ofasynchronous function calls.
 18. The method of claim 17, comprising:populating, via the client device, a queue representing additionalasynchronous requests for third web content, wherein the additionalasynchronous requests correspond to a third plurality of asynchronousfunction calls defined by the scripts; after transmitting the secondmessage comprising the representation of the second subset of the firstplurality of asynchronous function calls and the second plurality ofasynchronous function calls, receiving results associated with thesecond subset of the first plurality of asynchronous function calls andthe second plurality of asynchronous function calls; and determiningthat the queue is empty and that a web page has completed loading. 19.The method of claim 17, comprising: populating, via the client device, aqueue representing additional asynchronous requests for third webcontent, wherein the additional asynchronous requests correspond to athird plurality of asynchronous function calls defined by the scripts;prior to transmitting the first message comprising the orderedrepresentation of the first plurality of asynchronous function calls,detecting a trigger event; and in response to detecting the triggerevent, and in response to the first plurality of asynchronous functioncalls being present in the queue when the trigger event is detected,transmitting, to the web server device, the first message comprising theordered representation of the first plurality of asynchronous functioncalls.
 20. The method of claim 19, wherein detecting the trigger eventcomprises: detecting that a predetermined time period has expired,wherein the predetermined time period starts when the client devicebegins receiving the web document; detecting that a number ofasynchronous function calls read by the client device exceeds apredetermined threshold; detecting that the first plurality ofasynchronous function calls has been received; or any combinationthereof.